import request from "@/utils/request";

export const getMenuTree = () => {
  return request({
    url: "/v1/rbac/menu/tree",
    method: "get",
  });
};

export const createMenu = (data) => {
  return request({
    url: "/v1/rbac/menu/create",
    method: "post",
    data,
  });
};

export const updateMenu = (data) => {
  return request({
    url: "/v1/rbac/menu/update",
    method: "post",
    data,
  });
};

export const deleteMenu = (data) => {
  return request({
    url: "/v1/rbac/menu/delete",
    method: "post",
    data,
  });
};

export const menuBindActions = (data) => {
  return request({
    url: "/v1/rbac/menu/actions/add",
    method: "post",
    data,
  });
};
